<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>企业管理系统</title>

    <!-- Bootstrap -->
    <link href="${pageContext.request.contextPath}/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/list.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/detail.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid clear">
    <div class="nav-menu">
        <div class="nav navbar-nav navbar-left">
            <a href="">
                企业管理系统
            </a>
        </div>
        <div class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"
                   role="button" aria-haspopup="true" aria-expanded="false">
                    ${empty sessionScope.user.nickName ? '用户昵称未设置' : sessionScope.user.nickName }
                    <span class="caret"></span></a>
                <ul class="dropdown-menu">
                    <li><a href="users/settings.jsp">设置</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="logout">退出</a></li>
                </ul>
            </li>
        </div>
        <div class="clear"></div>
    </div>
    <div class="back-box">
        <a href="${pageContext.request.contextPath}/departments?type=list" class="back-btn  btn-default btn-lg">&lt;&nbsp;返&nbsp;&nbsp;回</a>
    </div>
    <div class="container content-box">
        <div class="row detail-title">
            <span>
               <span>${requestScope.DATA.name}</span>
                部门详情
            </span>
        </div>
        <div class="row">
            <div class="detail-box">
                <form class="form-horizontal" method="post" action="${pageContext.request.contextPath}/departments?type=${param.type}">
                    <div class="form-group hidden">
                        <label for="id" class="col-sm-offset-2 col-sm-2 control-label">部门主键</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-lg" id="id" name="id" value="${requestScope.DATA.id}" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dept-code" class="col-sm-offset-2 col-sm-2 control-label">部门编号</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-lg" id="dept-code" placeholder="请输入部门编号" value="${requestScope.DATA.code}" name="code"
                                ${param.type ne 'view' ? '' : 'readonly'}>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dept-name" class="col-sm-offset-2 col-sm-2 control-label">部门名称</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-lg" id="dept-name" placeholder="请输入部门名称" value="${requestScope.DATA.name}" name="name"
                            ${param.type ne 'view' ? '' : 'readonly'}>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-dept-address" class="col-sm-offset-2 col-sm-2 control-label">部门地址</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-lg" id="input-dept-address" placeholder="请输入部门地址" name="address" value="${requestScope.DATA.address}"
                            ${param.type ne 'view' ? '' : 'readonly'}>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-dept-ctime" class="col-sm-offset-2 col-sm-2 control-label">成立时间</label>
                        <div class="col-sm-4">
                            <input type="datetime-local" class="form-control input-lg" id="input-dept-ctime" readonly value="${requestScope.DATA.createdTime}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-dept-utime" class="col-sm-offset-2 col-sm-2 control-label">变更时间</label>
                        <div class="col-sm-4">
                            <input type="datetime-local" class="form-control input-lg" id="input-dept-utime" readonly value="${requestScope.DATA.updateTime}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-offset-2 col-sm-2 control-label">部门状态</label>
                        <div class="col-sm-4">
                            <label for="dept-disabled-true">
                                <input type="radio" id="dept-disabled-true" name="deleted" ${param.type eq 'view' ? 'disabled' : '' }  ${requestScope.DATA.disable  ? 'checked' : ''} value="1">
                                已注销
                            </label>
                            <label for="dept-disabled-false">
                                <input type="radio"  id="dept-disabled-false" name="deleted" ${param.type eq 'view' ? 'disabled' : '' }  ${requestScope.DATA.disable  ? '' : 'checked' } value="0">
                                正常
                            </label>
                        </div>
                    </div>
                    <div class="form-group ${param.type ne 'view' ? '' : 'hidden'}">
                        <div class="col-sm-offset-3 col-sm-6">
                            <button type="submit" class="btn btn-info btn-lg">提交并保存</button>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>
</body>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="${pageContext.request.contextPath}/jQuery/jquery-3.5.1.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="${pageContext.request.contextPath}/bootstrap-3.3.7/js/bootstrap.min.js"></script>
</html>